* GdkWindowAttributesType:
* @GDK_WA_X: Honor the X coordinate field
* @GDK_WA_Y: Honor the Y coordinate field
- * @GDK_WA_TYPE_HINT: Honor the type_hint field
*
* Used to indicate which fields in the #GdkWindowAttr struct should be honored.
* For example, if you filled in the “x” and “y” fields of #GdkWindowAttr,
typedef enum
{
GDK_WA_X = 1 << 1,
- GDK_WA_Y = 1 << 2,
- GDK_WA_TYPE_HINT = 1 << 3
+ GDK_WA_Y = 1 << 2
} GdkWindowAttributesType;
/* Size restriction enumeration.
impl->title = g_strdup (get_default_title ());
- if (attributes && attributes_mask & GDK_WA_TYPE_HINT)
- impl->type_hint = attributes->type_hint;
-
impl->pending_spec_update = TRUE;
return (GdkWindowImpl *) impl;
}
GDK_QUARTZ_RELEASE_POOL;
-
- if (attributes_mask & GDK_WA_TYPE_HINT)
- gdk_window_set_type_hint (window, attributes->type_hint);
}
void
create_dnd_window (GdkScreen *screen)
{
GdkWindowAttr attrs;
+ GdkWindow *window;
guint mask;
attrs.x = attrs.y = 0;
attrs.width = attrs.height = 100;
attrs.wclass = GDK_INPUT_OUTPUT;
attrs.window_type = GDK_WINDOW_TEMP;
- attrs.type_hint = GDK_WINDOW_TYPE_HINT_DND;
- mask = GDK_WA_X | GDK_WA_Y | GDK_WA_TYPE_HINT;
+ mask = GDK_WA_X | GDK_WA_Y;
+
+ window = gdk_window_new (gdk_screen_get_root_window (screen), &attrs, mask);
- return gdk_window_new (gdk_screen_get_root_window (screen), &attrs, mask);
+ gdk_window_set_type_hint (window, GDK_WINDOW_TYPE_HINT_DND);
+
+ return window;
}
GdkDragContext *
gdk_wayland_window_create_surface (window);
- if (attributes_mask & GDK_WA_TYPE_HINT)
- gdk_window_set_type_hint (window, attributes->type_hint);
-
frame_clock = gdk_window_get_frame_clock (window);
g_signal_connect (frame_clock, "before-paint",
remaining_mask &= ~GDK_WA_Y;
}
- if ((remaining_mask & ~(GDK_WA_TYPE_HINT)) != 0)
- g_warning ("_gdk_window_impl_new: uexpected attribute 0x%X",
- remaining_mask & ~(GDK_WA_TYPE_HINT));
+ if (remaining_mask != 0)
+ g_warning ("_gdk_window_impl_new: uexpected attribute 0x%X", remaining_mask);
hparent = GDK_WINDOW_HWND (real_parent);
impl->native_event_mask = GDK_STRUCTURE_MASK | event_mask;
- if (attributes_mask & GDK_WA_TYPE_HINT)
- gdk_window_set_type_hint (window, attributes->type_hint);
-
if (impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY)
dwExStyle |= WS_EX_TOOLWINDOW;
create_drag_window (GdkScreen *screen)
{
GdkWindowAttr attrs = { 0 };
+ GdkWindow *window;
guint mask;
attrs.x = attrs.y = 0;
attrs.width = attrs.height = 100;
attrs.wclass = GDK_INPUT_OUTPUT;
attrs.window_type = GDK_WINDOW_TEMP;
- attrs.type_hint = GDK_WINDOW_TYPE_HINT_DND;
- mask = GDK_WA_X | GDK_WA_Y | GDK_WA_TYPE_HINT;
+ mask = GDK_WA_X | GDK_WA_Y;
+
+ window = gdk_window_new (gdk_screen_get_root_window (screen), &attrs, mask);
- return gdk_window_new (gdk_screen_get_root_window (screen), &attrs, mask);
+ gdk_window_set_type_hint (window, GDK_WINDOW_TYPE_HINT_DND);
+
+ return window;
}
GdkDragContext *
break;
}
- if (attributes_mask & GDK_WA_TYPE_HINT)
- gdk_window_set_type_hint (window, attributes->type_hint);
-
gdk_x11_event_source_select_events ((GdkEventSource *) display_x11->event_source,
GDK_WINDOW_XID (window), event_mask,
StructureNotifyMask | PropertyChangeMask);
if (priv->decorated && priv->client_decorated)
attributes.event_mask |= GDK_POINTER_MOTION_MASK;
- attributes.type_hint = priv->type_hint;
-
- attributes_mask |= GDK_WA_TYPE_HINT;
-
gdk_window = gdk_window_new (parent_window, &attributes, attributes_mask);
}
gdk_window_set_transient_for (gdk_window,
_gtk_widget_get_window (GTK_WIDGET (priv->transient_parent)));
+ gdk_window_set_type_hint (gdk_window, priv->type_hint);
+
if (priv->title)
gdk_window_set_title (gdk_window, priv->title);